<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 500px;
            height: 500px;
            background-color: pink;
            overflow: hidden;
            /* text-align: center;
            line-height: 500px;
            vertical-align: middle; */
        }

        .box2 {
            width: 200px;
            height: 100px;
            background-color: green;
            margin: 200px auto;
            text-align: center;
            line-height: 100px;
            /* display: inline-block; */

        }

        .box3 {
            width: 500px;
            height: 500px;
            background-color: bisque;
            line-height: 500px;
            text-align: center;
        }

        :where(a, span) {
            font-size: 18px;
            text-decoration: none;
            color: black;
        }

        .spanstyle {
            background-color: green;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="box2">
            inner
        </div>
    </div>

    <div class="box3">
        <span class="spanstyle">我是一个行内元素span</span>
    </div>
</body>

</html>